<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/10/26 0026
 * Time: 下午 3:52
 */
//
function show($a){

    //print_r($a);
}


//show(array_map(function($v){
//
//    echo $v;
//},["a","b","c"]));

class A{

    public function __construct()
    {
        $d = array_reduce(["a","b","c"],$this->carry(),$this->call());
        print_r($d);
        //$d();
    }

    public function carry(){


        return function ($v1,$v2){


                return function ()use($v1,$v2){

                   // print_r($v1);
                   // print_r($v2);
                    //$v1();
                    echo $v2;

                    //$v1($v2);
                };
        };


    }
    public function call(){
        return function ($data){

            echo "china --- $data\r\n";

            return true;
        };
    }
};


(new A());

